import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/special_list/change_shifts_entity.dart';

ChangeShiftsEntity $ChangeShiftsEntityFromJson(Map<String, dynamic> json) {
  final ChangeShiftsEntity changeShiftsEntity = ChangeShiftsEntity();
  final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
  if (companyCode != null) {
    changeShiftsEntity.companyCode = companyCode;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    changeShiftsEntity.createBy = createBy;
  }
  final String? createById = jsonConvert.convert<String>(json['createById']);
  if (createById != null) {
    changeShiftsEntity.createById = createById;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    changeShiftsEntity.createDate = createDate;
  }
  final String? deleted = jsonConvert.convert<String>(json['deleted']);
  if (deleted != null) {
    changeShiftsEntity.deleted = deleted;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    changeShiftsEntity.id = id;
  }
  final String? joinContent = jsonConvert.convert<String>(json['joinContent']);
  if (joinContent != null) {
    changeShiftsEntity.joinContent = joinContent;
  }
  final String? joinList = jsonConvert.convert<String>(json['joinList']);
  if (joinList != null) {
    changeShiftsEntity.joinList = joinList;
  }
  final String? operatorList = jsonConvert.convert<String>(json['operatorList']);
  if (operatorList != null) {
    changeShiftsEntity.operatorList = operatorList;
  }
  final int? operatorType = jsonConvert.convert<int>(json['operatorType']);
  if (operatorType != null) {
    changeShiftsEntity.operatorType = operatorType;
  }
  final String? ticketPlanId = jsonConvert.convert<String>(json['ticketPlanId']);
  if (ticketPlanId != null) {
    changeShiftsEntity.ticketPlanId = ticketPlanId;
  }
  final String? ticketReceiptId = jsonConvert.convert<String>(json['ticketReceiptId']);
  if (ticketReceiptId != null) {
    changeShiftsEntity.ticketReceiptId = ticketReceiptId;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    changeShiftsEntity.updateBy = updateBy;
  }
  final String? updateById = jsonConvert.convert<String>(json['updateById']);
  if (updateById != null) {
    changeShiftsEntity.updateById = updateById;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    changeShiftsEntity.updateDate = updateDate;
  }
  return changeShiftsEntity;
}

Map<String, dynamic> $ChangeShiftsEntityToJson(ChangeShiftsEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['companyCode'] = entity.companyCode;
  data['createBy'] = entity.createBy;
  data['createById'] = entity.createById;
  data['createDate'] = entity.createDate;
  data['deleted'] = entity.deleted;
  data['id'] = entity.id;
  data['joinContent'] = entity.joinContent;
  data['joinList'] = entity.joinList;
  data['operatorList'] = entity.operatorList;
  data['operatorType'] = entity.operatorType;
  data['ticketPlanId'] = entity.ticketPlanId;
  data['ticketReceiptId'] = entity.ticketReceiptId;
  data['updateBy'] = entity.updateBy;
  data['updateById'] = entity.updateById;
  data['updateDate'] = entity.updateDate;
  return data;
}

extension ChangeShiftsEntityExtension on ChangeShiftsEntity {
  ChangeShiftsEntity copyWith({
    String? companyCode,
    String? createBy,
    String? createById,
    String? createDate,
    String? deleted,
    String? id,
    String? joinContent,
    String? joinList,
    String? operatorList,
    int? operatorType,
    String? ticketPlanId,
    String? ticketReceiptId,
    String? updateBy,
    String? updateById,
    String? updateDate,
  }) {
    return ChangeShiftsEntity()
      ..companyCode = companyCode ?? this.companyCode
      ..createBy = createBy ?? this.createBy
      ..createById = createById ?? this.createById
      ..createDate = createDate ?? this.createDate
      ..deleted = deleted ?? this.deleted
      ..id = id ?? this.id
      ..joinContent = joinContent ?? this.joinContent
      ..joinList = joinList ?? this.joinList
      ..operatorList = operatorList ?? this.operatorList
      ..operatorType = operatorType ?? this.operatorType
      ..ticketPlanId = ticketPlanId ?? this.ticketPlanId
      ..ticketReceiptId = ticketReceiptId ?? this.ticketReceiptId
      ..updateBy = updateBy ?? this.updateBy
      ..updateById = updateById ?? this.updateById
      ..updateDate = updateDate ?? this.updateDate;
  }
}
